
//permite ingresar solo numeros en un input
var nav4 = window.Event ? true : false;
function solo_numeros(evt){
	// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 ':'=58
	var key = nav4 ? evt.which : evt.keyCode;
	return (key <= 13 || (key >= 48 && key <= 58));
}

function numeros_punto(evt){
	// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 ':'=58
	var key = nav4 ? evt.which : evt.keyCode;
	return (key <= 13 || key == 46 || (key >= 48 && key <= 58));
}

function solo_letras(evt){
	// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 ':'=58
	var key = nav4 ? evt.which : evt.keyCode;
	//console.log(key);//solo para prueba
	return ( (key >= 65 && key <= 90 ) || ( key >= 97 && key <= 122 ) || key == 8 || key == 32 || key == 241 || key == 209 || key == 46 || key == 44 )
}


$(document).on("DOMSubtreeModified", function(){
	
	$('.solo_letras').keypress(function(evt){
		var key = nav4 ? evt.which : evt.keyCode;
		return ( (key >= 65 && key <= 90 ) || ( key >= 97 && key <= 122 ) || key == 8 || key == 32 || key == 241 || key == 209 || key == 46 || key == 44 )
	});

	$('.solo_numeros').keypress(function(evt){
		var key = nav4 ? evt.which : evt.keyCode;
		return (key <= 13 || (key >= 48 && key <= 58));
	});

	$('.numeros_punto').keypress(function(evt){
		var key = nav4 ? evt.which : evt.keyCode;
		return (key <= 13 || (key >= 48 && key <= 58));
	});

});



